package com.tianji.memory.pojo;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.List;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Document("chat_record")
public class ChatRecordDocument implements Serializable {

    @Id
    private ObjectId id; // _id 主键

    @Indexed
    private String conversationId; // 对话id

    private List<String> messages; // 所有对话数据
}